package com.xlh.dto.courseTest;

import com.xlh.pojo.courseTest.CourseTestPaper;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import java.util.Objects;

/**
 * @author chufangzheng
 * 用户考试情况查询
 */
@ApiModel(" 用户考试情况查询 ")
@Data
@ToString
public class UserCourseTestInfoDTO extends CourseTestPaper {

    @ApiModelProperty(" 学生得分 ")
    private Long getScore;

    @ApiModelProperty(" 学生ID ")
    private Long userId;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        UserCourseTestInfoDTO that = (UserCourseTestInfoDTO) o;
        return super.getId().equals(that.getId()) && userId.equals(that.userId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), super.getId(), userId);
    }
}
